home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
music
/
musedt.arc
/
MUSEDT
/
TESTDOSN.LST
< prev
next >
Wrap
File List
|
1992-12-24
|
857b
|
38 lines
DIM music_data&(50000)
CLS
PRINT "This program plays an *.xbs file on the"
PRINT "Atari ST sound chip using the xbios"
PRINT "32 call (dosound). Using this call"
PRINT "music is played in the background while"
PRINT "the computer is running a program. See"
PRINT "source program for sample code."
PRINT "...hit space bar to continue"
DO UNTIL k$<>""
k$=INKEY$
LOOP
REPEAT
@read_sound
IF EXIST(xbs$)=TRUE
@dosound
ELSE
STOP
ENDIF
UNTIL FALSE
> PROCEDURE dosound
LOCAL i%
' SPOKE &H484,PEEK(&H484) AND NOT 1
addr%=V:music_data&(0)
~XBIOS(32,L:addr%)
RETURN
> PROCEDURE read_sound
LOCAL a%
FILESELECT #"input file","*.xbs","noname.xbs",xbs$
PRINT "Input file = ";xbs$
IF EXIST(xbs$)=-1
OPEN "i",#1,xbs$
a%=LOF(#1)
CLOSE #1
BLOAD xbs$,VARPTR(music_data&(0))
ENDIF
RETURN